"use static";
function _classCallCheck(target, constructor) {
  if (!(target instanceof constructor)) {
    throw new Error("请使用new关键词");
  }
}

function _defineProperties(target, props) {
  for (var i = 0; i < props.length; i++) {
    const descriptor = props[i];
    descriptor.enumerable = descriptor.enumerable || false;
    descriptor.configurable = true;
    if ("value" in descriptor) descriptor.writable = true;
    Object.defineProperty(target, descriptor.key, descriptor);
  }
}

function _defineProperty(target, key, value) {
  if (key in target) {
    Object.defineProperty(target, key, {
      value,
      writable: true,
      enumerable: true,
      configurable: true,
    });
  } else {
    target[key] = value;
  }
}

function _createClass(constructor, propsValues, staticPropsValuse) {
  if (propsValues) _defineProperties(constructor.prototype, propsValues);
  if (staticPropsValuse) _defineProperties(constructor, staticPropsValuse);
}

var Computer = (function () {
  function Computer(name, price) {
    _classCallCheck(this, Computer);
    this.name = name;
    this.price = price;
    _defineProperty(this, "_a", 1);
  }

  _createClass(
    Computer,
    [
      {
        key: "showSth",
        value: function () {
          console.log(`这是一台${this.name}电脑`);
        },
      },
      {
        key: "a",
        get: function () {
          return this._a;
        },
        set: function (value) {
          this._a = value;
        },
      },
    ],
    [
      {
        key: "comStruct",
        value: function () {
          console.log("电脑由显示器，主机，键鼠组成");
        },
      },
    ]
  );

  return Computer;
})();
_defineProperty(Computer, "sta", 1);
const c1 = new Computer("huawei", 1);
console.log(c1);
c1.showSth();
Computer.comStruct();
